
declare module Microsoft.Office.WebExtension {

    /** Represents a single CustomXMLPart in a CustomXMLParts collection. */
    export class CustomXmlPart {

        /** Get a value that indicates whether the CustomXMLPart is built-in. */
        builtIn: boolean;

        /** Gets the GUID of the CustomXMLPart. */
        id: string;

        /** Gets the set of namespace prefix mappings (CustomXMLPrefixMappings) used against the current CustomXMLPart. */
        namespaceManager: CustomXmlPrefixMappings;

        /** Adds an event handler for a CustomXmlPart object event. */
        addHandlerAsync(eventType: EventType, handler: any, callback: (result: AsyncResult) => void, options?: { asyncContext?: any; });

        /** Asynchronously deletes this custom XML part from the collection. */
        deleteAsync(options?: { asyncContext?: any; }, callback?: (result: AsyncResult) => void);

        /** Asynchronously gets any CustomXmlNodes in this custom XML part which match the specified XPath. */
        getNodesAsync(xPath: string, options?: { asyncContext?: any; }, callback?: (result: AsyncResult) => void);

        /** Asynchronously gets the XML inside this custom XML part. */
        getXmlAsync(options?: { asyncContext?: any; }, callback?: (result: AsyncResult) => void);

        /** Removes an event handler for a CustomXmlPart object event. */
        removeHandlerAsync(eventType: EventType, options?: { handler?: string; asyncContext?: any; }, callback?: (result: AsyncResult) => void);
    }
}